<extend name="Base/common"/>
<block name="body">
    <div class="span9 page_message">
        <section id="contents">
            <include file="Addons/_nav"/>
            <!-- 数据列表 -->
            <div class="data-table">
                <div class="table-striped">
                    <table cellpadding="0" cellspacing="1">
                        <!-- 表头 -->
                        <thead>
                        <tr>
                            <volist name="list_fields" id="field">
                                <th>{$field.title}</th>
                            </volist>
                            <th class="row-selected row-selected" style="width: 60px"></th>
                        </tr>
                        </thead>

                        <!-- 列表 -->
                        <tbody>
                        <volist name="list_data" id="data">
                            <tr>
                                <volist name="list_fields" id="field">
                                    <td class="myImage">{:GetListField($field, $data)}</td>
                                </volist>
                                <td>
                                    <if condition="$data['status'] == 1">
                                        <a class="btn cancel"
                                           href="{:addons_url($_REQUEST ['_addons'].'://'.QrCode.'/cancel', array('action_id' => $data['id'], 'p' => $page))}">
                                            作废
                                        </a>
                                    </if>
                                    <if condition="$data['status'] == 2 || $data['status'] == 3 ">
                                        <button class="btn" style="background-color: #666666">
                                            作废
                                        </button>
                                    </if>

                                </td>
                            </tr>
                        </volist>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="page">{$_page|default=''}</div>
        </section>
    </div>
</block>
<block name="script">
    <script type="text/javascript" src="__ROOT__/Addons/QrCode/View/default/QrCode/Admin/js/layer/layer.js"></script>
    <script type="text/javascript">
        $(".myImage").click(function () {
            layer.open({
                title:"二维码",
                type: 1,
                closeBtn: 1, //不显示关闭按钮
                shift: 2,
                shadeClose: true, //开启遮罩关闭
                content: '<img width="300" height="300" src="'+$(this).children("img")[0].src+'"/>'
            });
        })
    </script>

</block>
